/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化，请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using VOL.Entity.SystemModels;

namespace VOL.Entity.DomainModels
{
    [Table("SellOrder")]
    [Entity(TableCnName = "销售订单", TableName = "SellOrder", DetailTable = new Type[] { typeof(SellOrderList) }, DetailTableCnName = "订单明细")]
    public class SellOrder : BaseEntity
    {
        /// <summary>
        ///Id
        /// </summary>
        [Key]
        [Display(Name = "Id")]
        [MaxLength(36)]
        [Column(TypeName = "uniqueidentifier")]
        [Required(AllowEmptyStrings = false)]
        public Guid Order_Id { get; set; }

        /// <summary>
        ///订单类型
        /// </summary>
        [Display(Name = "订单类型")]
        [Column(TypeName = "int")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public int OrderType { get; set; }

        /// <summary>
        ///运单号
        /// </summary>
        [Display(Name = "运单号")]
        [MaxLength(100)]
        [Column(TypeName = "nvarchar(100)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string TranNo { get; set; }

        /// <summary>
        ///销售订单号
        /// </summary>
        [Display(Name = "销售订单号")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string SellNo { get; set; }

        /// <summary>
        ///销售数量
        /// </summary>
        [Display(Name = "销售数量")]
        [Column(TypeName = "int")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public int Qty { get; set; }

        /// <summary>
        ///审核状态
        /// </summary>
        [Display(Name = "审核状态")]
        [Column(TypeName = "int")]
        [Required(AllowEmptyStrings = false)]
        public int AuditStatus { get; set; }

        /// <summary>
        ///审核时间
        /// </summary>
        [Display(Name = "审核时间")]
        [Column(TypeName = "datetime")]
        public DateTime? AuditDate { get; set; }

        /// <summary>
        ///审核人
        /// </summary>
        [Display(Name = "审核人")]
        [MaxLength(100)]
        [Column(TypeName = "nvarchar(100)")]
        public string Auditor { get; set; }

        /// <summary>
        ///审核人Id
        /// </summary>
        [Display(Name = "审核人Id")]
        [Column(TypeName = "int")]
        public int? AuditId { get; set; }

        /// <summary>
        ///备注
        /// </summary>
        [Display(Name = "备注")]
        [MaxLength(1000)]
        [Column(TypeName = "nvarchar(1000)")]
        [Editable(true)]
        public string Remark { get; set; }

        /// <summary>
        ///
        /// </summary>
        [Display(Name = "CreateID")]
        [Column(TypeName = "int")]
        public int? CreateID { get; set; }

        /// <summary>
        ///创建人
        /// </summary>
        [Display(Name = "创建人")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        public string Creator { get; set; }

        /// <summary>
        ///创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? CreateDate { get; set; }

        /// <summary>
        ///
        /// </summary>
        [Display(Name = "ModifyID")]
        [Column(TypeName = "int")]
        public int? ModifyID { get; set; }

        /// <summary>
        ///修改人
        /// </summary>
        [Display(Name = "修改人")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        public string Modifier { get; set; }

        /// <summary>
        ///修改时间
        /// </summary>
        [Display(Name = "修改时间")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? ModifyDate { get; set; }

        [Display(Name = "订单明细")]
        [ForeignKey("Order_Id")]
        public List<SellOrderList> SellOrderList { get; set; }

    }
}
